/*
 * CommuApi.h
 *
 *  Created on: 2025-4-30
 *      Author: Andy.zhai
 */
#ifndef __COMMU_API_H__
#define __COMMU_API_H__
#include "stdint.h"

typedef struct {
    uint8_t* data;
    uint32_t len;
} message_t;

void SendMessageToCommu(uint8_t *data, uint32_t len);

typedef enum {
    FileTransferID = 0,
    Usart2ID,
    ServiceID_MAX,
} ServiceID_t;

typedef uint8_t(*HandleMessage_t)(uint8_t*, uint32_t);

typedef struct {
    uint8_t id;
    HandleMessage_t handleMessage;
} commu_func_handle_t;

uint8_t CommuRegisterService(ServiceID_t svr_id, HandleMessage_t handleMessage);

#endif
